/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package niconico;

import javax.microedition.lcdui.Image;
import util.HttpUtil;

/**
 *
 * @author tfuru
 */
public class GetImage implements Runnable {
    private NicoSB m_parent = null;
    private Movie m_movie = null;

    public GetImage(NicoSB parent, Movie movie) {
        m_parent = parent;
        m_movie = movie;
    }

    public void run() {
        try {
            byte[] buf = HttpUtil.readByte(m_movie.m_img);
            Image img = Image.createImage(buf, 0, buf.length);
            m_parent.setDispImg(img);
        } catch (Exception ex) {
            //ex.printStackTrace();
        }
    }
}
